import request from '@/utils'

const base_api = '/admin/system/sysCourse'

export const getCourseByPage = (params:any) => {
  return request({
    url: `${base_api}/getCourseByPage`,
    method: 'post',
    data: params,
  })
}

export const deleteCourse = (params:any) => {
  return request({
    url: `${base_api}/deleteById`,
    method: 'post',
    data: params,
  })
}

export const addCourse = (params:any) => {
  return request({
    url: `${base_api}/saveSysCourse`,
    method: 'post',
    data: params,
  })
}

export const updateCourse = (params:any) => {
  return request({
    url: `${base_api}/updateSysCourse`,
    method: 'post',
    data: params,
  })
}

export const getComments = (params:any) => {
  return request({
    url: `${base_api}/getComments`,
    method: 'post',
    data: params,
  })
}

export const publishComment = (params: any) => {
  return request({
    url: `${base_api}/publishComment`,
    method: 'post',
    data: params,
  })
}

export const deleteComment = (params: any) => {
  return request({
    url: `${base_api}/deleteComment`,
    method: 'post',
    data: params,
  })
}

export const markSubmit = (params: any) => {
  return request({
    url: `${base_api}/markSubmit`,
    method: 'post',
    data: params,
  })
}

export const applySysCourse = (params: any) => {
  return request({
    url: `${base_api}/applySysCourse`,
    method: 'post',
    data: params,
  })
}

export const disApplySysCourse = (params: any) => {
  return request({
    url: `${base_api}/disApplySysCourse`,
    method: 'post',
    data: params,
  })
}
